//检查Email
function isEmail(text) {
    if (text.length == 0) return false;
    reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
    return reg.test(text);
}
//检查手机号
function isPhone(text) {
    if (text.length == 0) return false;
    reg = /^0?(13[0-9]|15[012356789]|18[0236789]|14[57]|17[0-9])[0-9]{8}$/
    return reg.test(text);
}

export { isEmail, isPhone }